<?php

class Community_Model_comparecourse extends Zend_Db_Table_Abstract {
	
	protected $_name = 'course_rating';
	protected $_db;

	/**
	 * Class constructor
	 */
	public function __construct(){
		
		$this->_db = Zend_Db_Table_Abstract::getDefaultAdapter();
	}
	
	/**
	 * Function compare courses
	 * @param unknown_type $course1
	 * @param unknown_type $course2
	 * @param unknown_type $param
	 */
	public function compare($course1, $semester, $year1, $course2, $sem, $year, $param = null){
		$rat = new Community_Model_ratecourse();
			$course1avgDistrubtion = $rat->avgRatings($course1, $semester, $year1);
			$course2avgDistribution = $rat->avgRatings($course2, $sem, $year);
			$arr = array();
			array_push($arr, $course1avgDistrubtion);
			array_push($arr, $course2avgDistribution);
			
			return $arr;
		}
	
}
	
	
	
	